home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
windows
/
2ndpw100.zip
/
2NDPW.WAS
Wrap
Text File
|
1992-10-20
|
5KB
|
72 lines
; 2NDPW.WAS v1.00 - Starts second session of PW on a different port
;****************************************************************************
;* *
;* 2NDPW.WAS *
;* Copyright (C) 1992 Datastorm Technologies, Inc. *
;* All rights reserved. *
;* *
;* Purpose: Starts a second session of PW on another port. Both *
;* PW windows are sized to the specs in the #DEFINE block. *
;* This script is handy when run from either a Meta Key or *
;* an icon in Program Manager *
;* *
;* This ASPECT SCRIPT is intended only as a sample of ASPECT programming. *
;* DATASTORM makes no warranty of any kind, express or implied, including *
;* without limitation, any warranties of merchantability and/or fitness *
;* for a particular purpose. Use of this program is at your own risk. *
;* *
;* Author: Chuck Spohr *
;* *
;****************************************************************************
;****************************************************************************
;* GLOBAL DEFINES *
;****************************************************************************
#define WTOP 24 ; Position of top of 1st window (pix)
#define WBOTTOM $YPIXELS - 64 ; Position of bottom of 2nd window
#define WLEFT 0 ; Left position of both windows
#define WWIDTH $XPIXELS ; Width of both windows
#define OVERLAP 64 ; Number of pixels to overlap
#define CONNECT_1 "direct connect-COM3" ; Use 0 to indicate default connection
#define CONNECT_2 "direct connect-COM4"
;****************************************************************************
;* *
;* MAIN *
;* The Main procedure backs up the PW.PRM file, saves a new .PRM file, *
;* records the dimensions of the current window, resizes it, starts 2nd *
;* session, resizes it, and finally restores PW.PRM. *
;* *
;* Calls: none *
;* Modifies globals: none *
;* *
;****************************************************************************
proc main
integer ThisWin, PWLeft, PWTop, PWWidth, PWHeight, WHeight, PW2Win, W2Top
string ParmPath = $PWTASKPATH, TmpPath= $PWTASKPATH
addfilename ParmPath "PW.PRM" ; Assemble path and filename of PW.PRM
addfilename TmpPath "TEMP.PRM" ; Create a name for the temporary .PRM
copyfile ParmPath TmpPath ; Back up PW.PRM to temporary name
set connection type CONNECT_2 DEFAULT ; Make 2nd connection default
savesetup ; and save it to PW.PRM
set connection type CONNECT_1 ; Switch back to 1st connection
ThisWin = $ACTIVEWIN ; Save ID of PW window
wincoord ThisWin PWLeft PWTop PWWidth PWHeight ; Save coordinates of PW
WHeight = (WBOTTOM - WTOP + OVERLAP) / 2 ; Calculate new size
sizewin ThisWin WLEFT WTOP WWIDTH WHeight ; Resize PW Window
W2Top = WTOP + WHeight - OVERLAP ; Calculate position of 2nd window
run "C:\PROWIN\PW.EXE" ; Start up 2nd session
PW2Win = $ACTIVEWIN ; Get window ID of 2nd session
sizewin PW2Win 0 W2Top $XPIXELS WHeight ; Resize the window
activatewin ThisWin ; Give 1st session focus
copyfile TmpPath ParmPath ; Restore the .PRM file
delfile TmpPath ; Delete the temp
endproc